package generic;

import org.junit.Test;

/**
 * @description: 测试泛型类在继承情况下8种定义
 * @author: apple
 * @date:  2021/12/25 12:52 下午
 * @version 1.0
 **/
public class FatherTest {

    @Test
    public void test1() {


        // 泛型类型为Object
        Son1 s = new Son1();
        s.add(1,2.3);

        Son2 s2 = new Son2();
        // class Son2 extends Father<Integer , String>
        s2.add(1,"abc");

        Son3 s3 = new Son3();
        s3.add(1,true);

        Son3<Integer,Double> son33 = new Son3<>();
        son33.add(1,1.78);

        Son4<Integer> s4 = new Son4<>();
        s4.add(2, "bv");

        Son5 s5 = new Son5();
        s5.add(123,2l);

        Son5<Double , Byte> s55 = new Son5<>();
        s55.add(false,23.3);
        byte a = 20;
        s55.show(1.2,new Byte(a));


        Son7<Integer,Integer,Integer,Integer> s7 = new Son7<>();
        s7.show(1,2,3,4);

        s7.my(123,"是");

    }

}
